package com.andy.stripes.actions;



import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;


public class TinMceActionBean  implements ActionBean {

	private static final String VIEW_INDEX="/light.jsp";
	
	private String  text;
	private ActionBeanContext context;
	public ActionBeanContext getContext() {
		// TODO Auto-generated method stub
		return context;
	}

	public void setContext(ActionBeanContext context) {

		this.context=context;
		
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
	
	
	@DefaultHandler
	public Resolution  writeArticle()
	{
		System.out.println("writeArtice");
		System.out.println(this.text);
		//HttpServletRequest hsr =context.getRequest();
		
		//hsr.setAttribute("text", this.text);
	
		return new ForwardResolution(VIEW_INDEX);
		
		
	}

}
